3.697 \(\int (d \cos (e+f x))^m (a+b \tan (e+f x)) \, dx\)

Optimal. Leaf size=90 \[ -\frac {a \sin (e+f x) (d \cos (e+f x))^{m+1} \, _2F_1\left (\frac {1}{2},\frac {m+1}{2};\frac {m+3}{2};\cos ^2(e+f x)\right )}{d f (m+1) \sqrt {\sin ^2(e+f x)}}-\frac {b (d \cos (e+f x))^m}{f m} \]

[Out]

-b*(d*cos(f*x+e))^m/f/m-a*(d*cos(f*x+e))^(1+m)*hypergeom([1/2, 1/2+1/2*m],[3/2+1/2*m],cos(f*x+e)^2)*sin(f*x+e)
/d/f/(1+m)/(sin(f*x+e)^2)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.10, antiderivative size = 91, normalized size of antiderivative = 1.01, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3515, 3486, 3772, 2643} \[ -\frac {a \sin (e+f x) \cos (e+f x) (d \cos (e+f x))^m \, _2F_1\left (\frac {1}{2},\frac {m+1}{2};\frac {m+3}{2};\cos ^2(e+f x)\right )}{f (m+1) \sqrt {\sin ^2(e+f x)}}-\frac {b (d \cos (e+f x))^m}{f m} \]

Antiderivative was successfully verified.

[In]

Int[(d*Cos[e + f*x])^m*(a + b*Tan[e + f*x]),x]

[Out]

-((b*(d*Cos[e + f*x])^m)/(f*m)) - (a*Cos[e + f*x]*(d*Cos[e + f*x])^m*Hypergeometric2F1[1/2, (1 + m)/2, (3 + m)
/2, Cos[e + f*x]^2]*Sin[e + f*x])/(f*(1 + m)*Sqrt[Sin[e + f*x]^2])

Rule 2643

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(Cos[c + d*x]*(b*Sin[c + d*x])^(n + 1)*Hypergeomet
ric2F1[1/2, (n + 1)/2, (n + 3)/2, Sin[c + d*x]^2])/(b*d*(n + 1)*Sqrt[Cos[c + d*x]^2]), x] /; FreeQ[{b, c, d, n
}, x] &&  !IntegerQ[2*n]

Rule 3486

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*(d*Sec[
e + f*x])^m)/(f*m), x] + Dist[a, Int[(d*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m}, x] && (IntegerQ[2
*m] || NeQ[a^2 + b^2, 0])

Rule 3515

Int[(cos[(e_.) + (f_.)*(x_)]*(d_.))^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[(d*Co
s[e + f*x])^m*(d*Sec[e + f*x])^m, Int[(a + b*Tan[e + f*x])^n/(d*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e,
f, m, n}, x] &&  !IntegerQ[m]

Rule 3772

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(b*Csc[c + d*x])^(n - 1)*((Sin[c + d*x]/b)^(n - 1)
*Int[1/(Sin[c + d*x]/b)^n, x]), x] /; FreeQ[{b, c, d, n}, x] &&  !IntegerQ[n]

Rubi steps

\begin {align*} \int (d \cos (e+f x))^m (a+b \tan (e+f x)) \, dx &=\left ((d \cos (e+f x))^m (d \sec (e+f x))^m\right ) \int (d \sec (e+f x))^{-m} (a+b \tan (e+f x)) \, dx\\ &=-\frac {b (d \cos (e+f x))^m}{f m}+\left (a (d \cos (e+f x))^m (d \sec (e+f x))^m\right ) \int (d \sec (e+f x))^{-m} \, dx\\ &=-\frac {b (d \cos (e+f x))^m}{f m}+\left (a \left (\frac {\cos (e+f x)}{d}\right )^{-m} (d \cos (e+f x))^m\right ) \int \left (\frac {\cos (e+f x)}{d}\right )^m \, dx\\ &=-\frac {b (d \cos (e+f x))^m}{f m}-\frac {a \cos (e+f x) (d \cos (e+f x))^m \, _2F_1\left (\frac {1}{2},\frac {1+m}{2};\frac {3+m}{2};\cos ^2(e+f x)\right ) \sin (e+f x)}{f (1+m) \sqrt {\sin ^2(e+f x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 1.05, size = 203, normalized size = 2.26 \[ \frac {(d \cos (e+f x))^m \left (-a (m-2) m \sin (2 (e+f x)) \, _2F_1\left (\frac {1}{2},\frac {m+1}{2};\frac {m+3}{2};\cos ^2(e+f x)\right )-2 b \left (m^2-m-2\right ) \sqrt {\sin ^2(e+f x)} \, _2F_1\left (1,\frac {m}{2};1-\frac {m}{2};-e^{2 i (e+f x)}\right )+2 b m (m+1) \sqrt {\sin ^2(e+f x)} \, _2F_1\left (1,\frac {m+2}{2};2-\frac {m}{2};-e^{2 i (e+f x)}\right ) (\cos (2 (e+f x))+i \sin (2 (e+f x)))\right )}{2 f (m-2) m (m+1) \sqrt {\sin ^2(e+f x)}} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[(d*Cos[e + f*x])^m*(a + b*Tan[e + f*x]),x]

[Out]

((d*Cos[e + f*x])^m*(-2*b*(-2 - m + m^2)*Hypergeometric2F1[1, m/2, 1 - m/2, -E^((2*I)*(e + f*x))]*Sqrt[Sin[e +
 f*x]^2] + 2*b*m*(1 + m)*Hypergeometric2F1[1, (2 + m)/2, 2 - m/2, -E^((2*I)*(e + f*x))]*Sqrt[Sin[e + f*x]^2]*(
Cos[2*(e + f*x)] + I*Sin[2*(e + f*x)]) - a*(-2 + m)*m*Hypergeometric2F1[1/2, (1 + m)/2, (3 + m)/2, Cos[e + f*x
]^2]*Sin[2*(e + f*x)]))/(2*f*(-2 + m)*m*(1 + m)*Sqrt[Sin[e + f*x]^2])

________________________________________________________________________________________

fricas [F]  time = 0.48, size = 0, normalized size = 0.00 \[ {\rm integral}\left ({\left (b \tan \left (f x + e\right ) + a\right )} \left (d \cos \left (f x + e\right )\right )^{m}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*cos(f*x+e))^m*(a+b*tan(f*x+e)),x, algorithm="fricas")

[Out]

integral((b*tan(f*x + e) + a)*(d*cos(f*x + e))^m, x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \tan \left (f x + e\right ) + a\right )} \left (d \cos \left (f x + e\right )\right )^{m}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*cos(f*x+e))^m*(a+b*tan(f*x+e)),x, algorithm="giac")

[Out]

integrate((b*tan(f*x + e) + a)*(d*cos(f*x + e))^m, x)

________________________________________________________________________________________

maple [F]  time = 1.69, size = 0, normalized size = 0.00 \[ \int \left (d \cos \left (f x +e \right )\right )^{m} \left (a +b \tan \left (f x +e \right )\right )\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*cos(f*x+e))^m*(a+b*tan(f*x+e)),x)

[Out]

int((d*cos(f*x+e))^m*(a+b*tan(f*x+e)),x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \tan \left (f x + e\right ) + a\right )} \left (d \cos \left (f x + e\right )\right )^{m}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*cos(f*x+e))^m*(a+b*tan(f*x+e)),x, algorithm="maxima")

[Out]

integrate((b*tan(f*x + e) + a)*(d*cos(f*x + e))^m, x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int {\left (d\,\cos \left (e+f\,x\right )\right )}^m\,\left (a+b\,\mathrm {tan}\left (e+f\,x\right )\right ) \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*cos(e + f*x))^m*(a + b*tan(e + f*x)),x)

[Out]

int((d*cos(e + f*x))^m*(a + b*tan(e + f*x)), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (d \cos {\left (e + f x \right )}\right )^{m} \left (a + b \tan {\left (e + f x \right )}\right )\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*cos(f*x+e))**m*(a+b*tan(f*x+e)),x)

[Out]

Integral((d*cos(e + f*x))**m*(a + b*tan(e + f*x)), x)

________________________________________________________________________________________